package mipushdemo.xiaomi.com.diyitonghang.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import mipushdemo.xiaomi.com.diyitonghang.R;
import mipushdemo.xiaomi.com.diyitonghang.data.bean.BaseChannelItem;

public class AdapterlistBaseChannelItem extends BaseQuickAdapter<BaseChannelItem,BaseViewHolder> {
    public AdapterlistBaseChannelItem(int layoutResId, @Nullable List<BaseChannelItem> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BaseChannelItem item) {
       helper.setText(R.id.title22,item.getTitle());
       helper.setText(R.id.pageviews2,item.getPageviews()+" 阅读");
       Glide.with(mContext).load(item.getImageListThumb().get(0)).into((ImageView) helper.getView(R.id.imageListThumb2));

    }
}
